import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'


// =====================================================================//
import Department from './views/org/Department.vue'
import Employee from './views/org/Employee.vue'
import Shop from "./views/org/Shop";
import DictionaryType from "./views/system/DictionaryType";
import DictionaryDetail from "./views/system/DictionaryDetail";
import ShopRegister from "./views/ShopRegister";
import Menu from "./views/system/Menu";
import Role from "./views/system/Role";

let routes = [
    {
        path: '/login', // 请求地址
        component: Login, // 请求组件：页面
        name: '', // 显示的名称
        hidden: true // 是否隐藏
    },
    {
        path: '/register', // 请求地址
        component: ShopRegister, // 请求组件：页面
        name: '', // 显示的名称
        hidden: true // 是否隐藏
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    { // 后台管理首页
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'el-icon-s-home',
        leaf: true, // 只有一个节点,没有子菜单
        children: [
            {path: '/echarts', component: echarts, name: '首页'}
        ]
    },
   /* {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            {path: '/department', component: Department, name: '部门管理'},
            {path: '/employee', component: Employee, name: '员工管理'},
            {path: '/shop', component: Shop, name: '店铺管理'},
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-s-tools',
        children: [
            {path: '/dictionaryType', component: DictionaryType, name: '字典类型'},
            {path: '/dictionaryDetail', component: DictionaryDetail, name: '字典详情'},
            {path: '/menu', component: Menu, name: '菜单管理'},
            {path: '/role', component: Role, name: '角色管理'}
        ]
    },*/
    {
        path: '*',
        hidden: true,
        redirect: {path: '/404'}
    }
];

export default routes;